import { reqSearchList } from '@/api'
const state = {
    searchList: {},

}
const mutations = {
    GETSEARCHLIST(state, searchList) {
        state.searchList = searchList

    }
}
const actions = {
    async getSearchList({ commit }, searchParams) {
        // 两个小时找到的bug 页面配置好的要传递的参数searchParams 但是这里没有进行接收 我操了
        let result = await reqSearchList(searchParams)
        if (result.code === 200) {
            commit('GETSEARCHLIST', result.data)
        }
    }
}
const getters = {
    goodsList: (state) => {
        return state.searchList.goodsList

    },
    trademarkList: (state) => {
        return state.searchList.trademarkList
    },
    attrsList: (state) => {
        return state.searchList.attrsList
    },
  


}
export default {
    state,
    mutations,
    actions,
    getters,

}